home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.6 KB | 161 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLGC.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef SLGC_H
- #define SLGC_H
-
- #ifndef SLGRDEF_H
- #include "SLGrDef.h"
- #endif
-
- #ifndef SLGDEV_H
- #include "SLGDev.h"
- #endif
-
- #ifndef SLMAPING_H
- #include "SLMaping.h"
- #endif
-
- #ifndef SLPTRECT_H
- #include "SLPtRect.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODShape;
- class ODCanvas;
- class ODTransform;
-
- struct FW_SPrivSuspendResumeState;
- struct FW_SPrivDeviceState;
-
- //========================================================================================
- // struct FW_SGraphicContext
- //========================================================================================
-
- struct FW_SGraphicContext
- {
- FW_Boolean fInitialized;
-
- Environment* fEnvironment;
-
- FW_SGraphicContext* fPreviousGraphicContext;
-
- FW_SMapping fMapping;
-
- FW_HGDevice fGraphicDevice;
- ODTransform* fTransform;
-
- FW_SPrivDeviceState* fDevicePreviousState;
- FW_SPrivSuspendResumeState* fDeviceSuspendState;
- };
-
- //========================================================================================
- // Extern C Methods
- //========================================================================================
-
- // Export or Import functions for CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import on
- #elif defined(FW_ODFLIB)
- #pragma export on
- #endif
-
- FW_EXTERN_C_BEGIN
-
- // The one and only current GC
-
- FW_SGraphicContext* SL_API FW_PrivGC_GetCurrent(Environment* ev);
-
- // Construction/destruction
-
- void SL_API FW_PrivGC_Clear(Environment* ev, FW_SGraphicContext& gc);
- void SL_API FW_PrivGC_Initialize(Environment* ev,
- FW_SGraphicContext& gc,
- FW_HGDevice graphicDevice,
- ODTransform* transform,
- ODShape* clipShape);
- void SL_API FW_PrivGC_Terminate(Environment* ev, FW_SGraphicContext& gc);
-
- void SL_API FW_PrivGC_ChangeClipAndTransform(Environment* ev,
- FW_SGraphicContext& gc,
- ODTransform* transform,
- ODShape* clipShape);
- // Clipping
-
- ODShape* SL_API FW_PrivGC_GetClip(Environment* ev, const FW_SGraphicContext& gc);
- void SL_API FW_PrivGC_SetClip(Environment* ev, FW_SGraphicContext& gc, ODShape* odShape);
-
- void SL_API FW_PrivGC_GetClipRect(Environment* ev, const FW_SGraphicContext& gc, FW_SRect& clipRect);
- void SL_API FW_PrivGC_SetClipRect(Environment* ev, FW_SGraphicContext& gc, const FW_SRect& clipRect);
-
- // Coordinate conversion
-
- void SL_API FW_PrivGC_SetMapping(Environment* ev, FW_SGraphicContext& gc, const FW_SMapping& newMapping);
- void SL_API FW_PrivGC_GetOriginOffset(Environment* ev, const FW_SGraphicContext& gc, FW_PlatformPoint& offset);
-
- // ----- Logical to device
-
- void SL_API FW_PrivGC_LogicalToDeviceSize(Environment* ev,
- const FW_SGraphicContext& gc,
- FW_Fixed xSize,
- FW_Fixed ySize,
- FW_PlatformPoint& ptResult);
-
- void SL_API FW_PrivGC_LogicalToDevicePoint(Environment* ev,
- const FW_SGraphicContext& gc,
- const FW_SPoint& point,
- FW_PlatformPoint& ptResult);
-
- void SL_API FW_PrivGC_LogicalToDeviceRect(Environment* ev,
- const FW_SGraphicContext& gc,
- const FW_SRect& rect,
- FW_PlatformRect& rectResult);
-
- ODShape* SL_API FW_PrivGC_LogicalToDeviceShape(Environment* ev,
- const FW_SGraphicContext& gc,
- ODShape* shape);
-
- // ----- Device to logical
-
- void SL_API FW_PrivGC_DeviceToLogicalSize(Environment* ev,
- const FW_SGraphicContext& gc,
- FW_PlatformCoordinate xSize,
- FW_PlatformCoordinate ySize,
- FW_SPoint& ptResult);
-
- void SL_API FW_PrivGC_DeviceToLogicalPoint(Environment* ev,
- const FW_SGraphicContext& gc,
- const FW_PlatformPoint& point,
- FW_SPoint& ptResult);
-
- void SL_API FW_PrivGC_DeviceToLogicalRect(Environment* ev,
- const FW_SGraphicContext& gc,
- const FW_PlatformRect& rect,
- FW_SRect& rectResult);
-
- ODShape* SL_API FW_PrivGC_DeviceToLogicalShape(Environment* ev,
- const FW_SGraphicContext& gc,
- ODShape* region);
-
- FW_EXTERN_C_END
-
- // For CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import off
- #elif defined(FW_ODFLIB)
- #pragma export off
- #endif
-
- #endif // SLGC_H
-